/**
 * @summary 频道模块
 * @author  ll
 */

import { getChannelList } from '@/api/channel';

export default {
  namespaced: true,
  state: {
    // 频道列表
    channelList: [],
  },
  mutations: {
    SET_CHANNEL_LIST(state, newValue) {
      state.channelList = newValue;
    },
  },
  actions: {
    async updateChannelList(context) {
      const res = await getChannelList();
      context.commit('SET_CHANNEL_LIST', res);
    },

  }
}
